<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>06_列表渲染</title>
    <!-- 引入Vue -->
    <script src="../node_modules/vue/dist/vue.js"></script>
</head>

<body>
    <!-- 编写div元素 -->
    <div id="app">
        <ul>
            <!-- <li v-for="item in items">{{item}}</li> -->
            <li v-for="(item,index) in items">{{item}}--{{index}}</li>
        </ul>
    </div>
    <!-- 编写Vue实例 -->
    <script>
        const vm = new Vue({
            // VM
            el: '#app',
            data: {
                items: ['test1', 'test2', 'test3']
            }
        })
    </script>
</body>

</html>